package com.shadt.pay.entity;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * shadt订单
 * 
 * @author SongR
 * 
 */
@Entity
public class Pay_Shadt_Order {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer order_id;
	private String order_noncestr;// 随机字符串
	private String order_sign;// 签名
	private String order_body;// 商品描述
	@Column(length = 8192)
	private String order_detail;// 商品详情
	private String order_attach;// 附加数据
	private String order_tradeno;// 商户订单号
	private Integer order_totalfee;// 总金额
	private String order_terminalip;// 终端IP
	private String order_notifyUrl;// 通知地址==接收支付异步通知回调地址，通知url必须为直接可访问的url，不能携带参数。
	private Date order_createTime;// 订单创建时间
	private Integer order_trade_status;// 订单支付状态，0：未发起支付，1:发起支付中,2:支付失败,9:支付成功
	private String order_trade_type;// 订单支付方式(支付成功才有)
	private Date order_trade_time;// 订单支付时间(支付成功才有)
	private String redirect_uri;
	
	
	@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE,CascadeType.REFRESH }, fetch = FetchType.LAZY)
	@JoinColumn(name = "shadt_id")
	private Pay_Shadt_App shadtApp;// 对应的shadt商户

	public String getRedirect_uri() {
		return redirect_uri;
	}
	public void setRedirect_uri(String redirect_uri) {
		this.redirect_uri = redirect_uri;
	}
	public Integer getOrder_id() {
		return order_id;
	}
	public void setOrder_id(Integer order_id) {
		this.order_id = order_id;
	}

	public String getOrder_noncestr() {
		return order_noncestr;
	}

	public void setOrder_noncestr(String order_noncestr) {
		this.order_noncestr = order_noncestr;
	}

	public String getOrder_sign() {
		return order_sign;
	}

	public void setOrder_sign(String order_sign) {
		this.order_sign = order_sign;
	}

	public String getOrder_body() {
		return order_body;
	}

	public void setOrder_body(String order_body) {
		this.order_body = order_body;
	}

	public String getOrder_detail() {
		return order_detail;
	}

	public void setOrder_detail(String order_detail) {
		this.order_detail = order_detail;
	}

	public String getOrder_attach() {
		return order_attach;
	}

	public void setOrder_attach(String order_attach) {
		this.order_attach = order_attach;
	}

	public String getOrder_tradeno() {
		return order_tradeno;
	}

	public void setOrder_tradeno(String order_tradeno) {
		this.order_tradeno = order_tradeno;
	}

	public Integer getOrder_totalfee() {
		return order_totalfee;
	}

	public void setOrder_totalfee(Integer order_totalfee) {
		this.order_totalfee = order_totalfee;
	}

	public String getOrder_terminalip() {
		return order_terminalip;
	}

	public void setOrder_terminalip(String order_terminalip) {
		this.order_terminalip = order_terminalip;
	}

	public String getOrder_notifyUrl() {
		return order_notifyUrl;
	}

	public void setOrder_notifyUrl(String order_notifyUrl) {
		this.order_notifyUrl = order_notifyUrl;
	}

	public Date getOrder_createTime() {
		return order_createTime;
	}

	public void setOrder_createTime(Date order_createTime) {
		this.order_createTime = order_createTime;
	}

	public Integer getOrder_trade_status() {
		return order_trade_status;
	}

	public void setOrder_trade_status(Integer order_trade_status) {
		this.order_trade_status = order_trade_status;
	}

	public String getOrder_trade_type() {
		return order_trade_type;
	}

	public void setOrder_trade_type(String order_trade_type) {
		this.order_trade_type = order_trade_type;
	}

	public Date getOrder_trade_time() {
		return order_trade_time;
	}

	public void setOrder_trade_time(Date order_trade_time) {
		this.order_trade_time = order_trade_time;
	}

	public Pay_Shadt_App getShadtApp() {
		return shadtApp;
	}

	public void setShadtApp(Pay_Shadt_App shadtApp) {
		this.shadtApp = shadtApp;
	}

}
